package org.krivtsun.scanlab.utils;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 * Label with hypertext links support.
 *
 * @author Andrew Krivtsun
 */
public class LinkLabel extends JLabel {

    LinkLabel(String text, String url) {
        super(text);
        setCursor(new Cursor(Cursor.HAND_CURSOR));
        addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                System.out.println(this);
            }
        });
    }
}
